"use client";
import React, { useImperativeHandle } from "react";
import { Image } from "antd-mobile";
interface IProps {
    src: string;
    name?: string;
    className?: string;
}
const ImageViewer: React.ForwardRefRenderFunction<never, IProps> = (
    props,
    forwardedRef
) => {
    const { name, src, className } = props;
    useImperativeHandle(forwardedRef, () => null);
    return (
        <div
            className={`w-full h-full flex flex-col justify-center items-center ${className}`}
        >
            <Image fit="contain" alt={name} src={src} />
        </div>
    );
};
export default React.memo(React.forwardRef(ImageViewer));
